/**
 * 
 */

$('#cy-reward-click').show();

    
$('#cyReward').delegate('#cy-reward-click', "click", function(){
	var deviceWidth = window.innerWidth || document.documentElement.clientWidth; 
	if (deviceWidth >= 768) {        
		renderRewardWindow();
	}else{
		alert('移动端暂不支持打赏功能，感谢您！');
	}
});
    
$('#cyReward').delegate('#cy-reward-pop div[node-type="cy-close-btn"]', 'click', function () {
	$('#cy-reward-pop').hide();
});
    
$('#cyReward').delegate('#cy-reward-pop span[node-type="check-platform"]', 'click', function () {
	var _this = $(this);
	$('div[node-type="platform-choice"]').find('.platform-radio-box').removeClass('platform-checked');
	_this.addClass('platform-checked');
	$('div[node-type="cy-reward-code"] img').eq(_this.parent().index()).show().siblings().hide();
});
    
function renderRewardWindow() {
	$('#cy-reward-pop').show();
}
	
